SELL	= /bin/sh
CC	= g++
OPT	= -O2 -Wall
DEBUG	= -g
BIN	= ../../bin
PROGS	= $(BIN)/srch_strings $(BIN)/sigfind
CFLAGS	= $(DEFS) $(INCL) $(OPT) $(DEBUG) -I. -I ../auxtools $(XFLAGS)

LIBOBJ  = srch_strings.o 
LIBS    = -L../../lib -lsrchtools -lauxtools
LIB = ../../lib/libsrchtools.a

defs:
	@CC="$(CC)" sh ../makedefs

all:    $(LIB) $(PROGS)

$(LIB): $(LIBOBJ)
	$(AR) $@ $?
	$(RANLIB) $@

$(BIN)/srch_strings: srch_strings.o $(LIB)
	$(CC) $(CFLAGS) -o $@ srch_strings.o $(LIBS)

$(BIN)/sigfind: sigfind.o $(LIB)
	$(CC) $(CFLAGS) -o $@ sigfind.o $(LIBS) 

indent:
	indent sigfind.c

clean:
	rm -f $(PROGS) $(LIB) *.o core *.core *~

depend: $(MAKES)
	(sed '1,/^# do not edit/!d' Makefile; \
	set -e; for i in [a-z][a-z0-9]*.c; do \
	    $(CC) -E $(DEFS) $(INCL) $$i | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
	    -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' -e 'p' -e '}'; \
	done) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile

# do not edit below this line - it is generated by 'make depend'
srch_strings.o: srch_strings.c
sigfind.o: sigfind.c
sigfind.o: ../auxtools/tsk_os.h
